package cn.flying.cloud.task.core.model;

import java.io.Serializable;
import java.time.LocalDateTime;

import org.apache.commons.lang3.builder.ToStringBuilder;

/**
 * <p>
 * 批量任务step执行日志
 * </p>
 *
 * @author admin
 * @since 2024-06-06 17:15:47
 */
public class StepResult implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    private Long id;

    /**
     * 流水号
     */
    private String serialNo;

    /**
     * 任务名称
     */
    private String jobName;

    /**
     * 任务ID
     */
    private Long jobId;

    /**
     * 执行ID
     */
    private Long executionId;

    /**
     * 步骤ID
     */
    private Long stepId;

    /**
     * 步骤名称
     */
    private String stepName;

    /**
     * 步骤描述
     */
    private String stepDesc;

    /**
     * 开始时间
     */
    private LocalDateTime startTime;

    /**
     * 结束时间
     */
    private LocalDateTime endTime;

    /**
     * 执行状态
     */
    private String status;

    /**
     * 执行耗时
     */
    private Long duration;

    /**
     * 执行信息
     */
    private String stepMsg;

    /**
     * 异常栈
     */
    private String stepTrace;

    /**
     * 租户ID
     */
    private String tenantId;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getSerialNo() {
        return serialNo;
    }

    public void setSerialNo(String serialNo) {
        this.serialNo = serialNo;
    }

    public String getJobName() {
        return jobName;
    }

    public void setJobName(String jobName) {
        this.jobName = jobName;
    }

    public Long getJobId() {
        return jobId;
    }

    public void setJobId(Long jobId) {
        this.jobId = jobId;
    }

    public Long getExecutionId() {
        return executionId;
    }

    public void setExecutionId(Long executionId) {
        this.executionId = executionId;
    }

    public Long getStepId() {
        return stepId;
    }

    public void setStepId(Long stepId) {
        this.stepId = stepId;
    }

    public String getStepName() {
        return stepName;
    }

    public void setStepName(String stepName) {
        this.stepName = stepName;
    }

    public String getStepDesc() {
        return stepDesc;
    }

    public void setStepDesc(String stepDesc) {
        this.stepDesc = stepDesc;
    }

    public LocalDateTime getStartTime() {
        return startTime;
    }

    public void setStartTime(LocalDateTime startTime) {
        this.startTime = startTime;
    }

    public LocalDateTime getEndTime() {
        return endTime;
    }

    public void setEndTime(LocalDateTime endTime) {
        this.endTime = endTime;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Long getDuration() {
        return duration;
    }

    public void setDuration(Long duration) {
        this.duration = duration;
    }

    public String getStepMsg() {
        return stepMsg;
    }

    public void setStepMsg(String stepMsg) {
        this.stepMsg = stepMsg;
    }

    public String getStepTrace() {
        return stepTrace;
    }

    public void setStepTrace(String stepTrace) {
        this.stepTrace = stepTrace;
    }

    public String getTenantId() {
        return tenantId;
    }

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this)
                .append("id", id)
                .append("serialNo", serialNo)
                .append("jobName", jobName)
                .append("jobId", jobId)
                .append("executionId", executionId)
                .append("stepId", stepId)
                .append("stepName", stepName)
                .append("stepDesc", stepDesc)
                .append("startTime", startTime)
                .append("endTime", endTime)
                .append("status", status)
                .append("duration", duration)
                .append("stepMsg", stepMsg)
                .append("stepTrace", stepTrace)
                .append("tenantId", tenantId)
                .toString();
    }
}
